package com.ruoyi.gatewayadmin.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gatewayadmin.mapper.GatewayAppRouterMapper;
import com.ruoyi.gatewayadmin.domain.GatewayAppRouter;
import com.ruoyi.gatewayadmin.service.IGatewayAppRouterService;

/**
 * 应用权限Service业务层处理
 *
 * @author Darwin
 * @date 2024-10-14
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class GatewayAppRouterServiceImpl implements IGatewayAppRouterService
{
    @Autowired
    private GatewayAppRouterMapper gatewayAppRouterMapper;

    /**
     * 查询应用权限
     *
     * @param uuid 应用权限主键
     * @return 应用权限
     */
    @Override
    public GatewayAppRouter selectGatewayAppRouterByUuid(String uuid)
    {
        return gatewayAppRouterMapper.selectGatewayAppRouterByUuid(uuid);
    }

    /**
     * 查询应用权限列表
     *
     * @param gatewayAppRouter 应用权限
     * @return 应用权限
     */
    @Override
    public List<GatewayAppRouter> selectGatewayAppRouterList(GatewayAppRouter gatewayAppRouter)
    {
        return gatewayAppRouterMapper.selectGatewayAppRouterList(gatewayAppRouter);
    }

    /**
     * 新增应用权限
     *
     * @param gatewayAppRouter 应用权限
     * @return 结果
     */
    @Override
    public int insertGatewayAppRouter(GatewayAppRouter gatewayAppRouter)
    {
        return gatewayAppRouterMapper.insertGatewayAppRouter(gatewayAppRouter);
    }

    /**
     * 修改应用权限
     *
     * @param gatewayAppRouter 应用权限
     * @return 结果
     */
    @Override
    public int updateGatewayAppRouter(GatewayAppRouter gatewayAppRouter)
    {
        return gatewayAppRouterMapper.updateGatewayAppRouter(gatewayAppRouter);
    }

    /**
     * 批量删除应用权限
     *
     * @param uuids 需要删除的应用权限主键
     * @return 结果
     */
    @Override
    public int deleteGatewayAppRouterByUuids(String[] uuids)
    {
        return gatewayAppRouterMapper.deleteGatewayAppRouterByUuids(uuids);
    }

    /**
     * 删除应用权限信息
     *
     * @param uuid 应用权限主键
     * @return 结果
     */
    @Override
    public int deleteGatewayAppRouterByUuid(String uuid)
    {
        return gatewayAppRouterMapper.deleteGatewayAppRouterByUuid(uuid);
    }
}
